package com.fzshang.commen.bean;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.ToString;

/**
 * <p>
 * 菜品管理
 * </p>
 *
 * @author 冯政尚
 * @since 2020-02-01
 */
@ToString
@ApiModel(value="Commodity对象", description="菜品管理")
public class Commodity extends Model<Commodity> {

    private static final long serialVersionUID = 1L;

    @TableId("id")
    private Long id;

    @ApiModelProperty(value = "商品名称")
    @TableField("commodity_name")
    private String commodityName;

    @ApiModelProperty(value = "价格")
    @TableField("price")
    private String price;

    @ApiModelProperty(value = "菜品分类id")
    @TableField("classification")
    private Long classification;

    @ApiModelProperty(value = "商品主图")
    @TableField("commodity_url")
    private String commodityUrl;

    @ApiModelProperty(value = "商品描述")
    @TableField("commodity_describe")
    private String commodityDescribe;

    @ApiModelProperty(value = "商品规格 1杯量 2份量")
    @TableField("commodity_specifications")
    private Integer commoditySpecifications;

    @ApiModelProperty(value = "是否上架")
    @TableField("on_the_shelf")
    private Integer onTheShelf;

    @ApiModelProperty(value = "商家id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "属性分类id")
    @TableField("attribute_classification_id")
    private Long attributeClassificationId;

    @ApiModelProperty(value = "属性id")
    @TableField("attribute_id")
    private Long attributeId;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private Long createTime;

    @ApiModelProperty(value = "类型 1大杯 2中杯 3小杯")
    @TableField("type")
    private Integer type;

    @ApiModelProperty(value = "菜品分类名称")
    @TableField(exist = false)
    private String varietyName;

    @ApiModelProperty(value = "属性分类名称")
    @TableField(exist = false)
    private String attributeClassification;

    @ApiModelProperty(value = "属性名称")
    @TableField(exist = false)
    private String attribute;

    @ApiModelProperty(value = "商家名称")
    @TableField(exist = false)
    private String nameOfMerchant;

    @ApiModelProperty(value = "下标")
    @TableField(exist = false)
    private Integer subscript;

    public Integer getSubscript() {
        return subscript;
    }

    public void setSubscript(Integer subscript) {
        this.subscript = subscript;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getNameOfMerchant() {
        return nameOfMerchant;
    }

    public void setNameOfMerchant(String nameOfMerchant) {
        this.nameOfMerchant = nameOfMerchant;
    }

    public String getVarietyName() {
        return varietyName;
    }

    public void setVarietyName(String varietyName) {
        this.varietyName = varietyName;
    }

    public String getAttributeClassification() {
        return attributeClassification;
    }

    public void setAttributeClassification(String attributeClassification) {
        this.attributeClassification = attributeClassification;
    }

    public String getAttribute() {
        return attribute;
    }

    public void setAttribute(String attribute) {
        this.attribute = attribute;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getCommodityName() {
        return commodityName;
    }

    public void setCommodityName(String commodityName) {
        this.commodityName = commodityName;
    }
    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }
    public Long getClassification() {
        return classification;
    }

    public void setClassification(Long classification) {
        this.classification = classification;
    }
    public String getCommodityUrl() {
        return commodityUrl;
    }

    public void setCommodityUrl(String commodityUrl) {
        this.commodityUrl = commodityUrl;
    }
    public String getCommodityDescribe() {
        return commodityDescribe;
    }

    public void setCommodityDescribe(String commodityDescribe) {
        this.commodityDescribe = commodityDescribe;
    }
    public Integer getCommoditySpecifications() {
        return commoditySpecifications;
    }

    public void setCommoditySpecifications(Integer commoditySpecifications) {
        this.commoditySpecifications = commoditySpecifications;
    }
    public Integer getOnTheShelf() {
        return onTheShelf;
    }

    public void setOnTheShelf(Integer onTheShelf) {
        this.onTheShelf = onTheShelf;
    }
    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }
    public Long getAttributeClassificationId() {
        return attributeClassificationId;
    }

    public void setAttributeClassificationId(Long attributeClassificationId) {
        this.attributeClassificationId = attributeClassificationId;
    }
    public Long getAttributeId() {
        return attributeId;
    }

    public void setAttributeId(Long attributeId) {
        this.attributeId = attributeId;
    }
    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Commodity{" +
            "id=" + id +
            ", commodityName=" + commodityName +
            ", price=" + price +
            ", classification=" + classification +
            ", commodityUrl=" + commodityUrl +
            ", commodityDescribe=" + commodityDescribe +
            ", commoditySpecifications=" + commoditySpecifications +
            ", onTheShelf=" + onTheShelf +
            ", userId=" + userId +
            ", attributeClassificationId=" + attributeClassificationId +
            ", attributeId=" + attributeId +
            ", createTime=" + createTime +
        "}";
    }
}
